function showAutoNotesForTrace(handles)
% showAutoNotesForTrace

% gs march 2008
% ---------------------------------------

data = get(gcf, 'UserData');
assignin('base', 'data', data);

currentDir = fileparts(data.completename);
[p,f,ext] = fileparts(data.currentTrace.header.autonotes.autonotes.filename);
autoNotesFileName = [f ext];
autoNotesFullName = [currentDir filesep autoNotesFileName];
checkExist = exist(autoNotesFullName, 'file');
if checkExist == 2
    eval(['!notepad ' autoNotesFullName ' &'])
else
    disp('showAutoNotesForTrace: file not found.');
    % go up a level, try again
    filesepInds = strfind(currentDir, filesep);
    currentDir2 = currentDir(1 : filesepInds(end));
    autoNotesFullName = [currentDir2 autoNotesFileName];
    checkExist = exist(autoNotesFullName, 'file');
    if checkExist == 2
        eval(['!notepad ' autoNotesFullName ' &'])
    else
        disp('showAutoNotesForTrace: file not found.');
    end
end

return

% d = handles.data.analysis.uncagingPathName;
% inds = strfind(d, '\');
%     lastchar = inds(length(inds) - 1); 
%     exptDir = d(1:lastchar);
%     exptName = handles.data.analysis.experimentName;
%     fileExt = '.txt';
%     str = [exptDir exptName fileExt];
% 	eval(['! ' str ' &'])
